Repository navigation
Conversation
A tenhou has no winning tile, but kokushi, chuuren and suuankou were judged by the wait of win_tile, so the same dealt hand scored a different yakuman count depending on which tile was passed. Every tile kind in a tenhou hand is now tried as the winning tile and the most expensive reading is kept. On equal totals the reading with more double yakuman forms wins, so without has_double_yakuman a tenhou still names that form at single yakuman. Chiihou keeps the wait of its drawn tile.
| ## Bug fixes | ||
| - A tenhou with kokushi, chuuren poutou or suuankou scored differently depending on `win_tile`. Now it always scores the thirteen-sided, nine-sided or tanki form. |
There was a problem hiding this comment.
This change should be treated as a behavioral change, not a bug fix.
It might even be considered a breaking change.
| A tenhou has no winning tile, so each tile kind in it is tried as one, and ``win_tile`` | ||
| does not change the result. |
There was a problem hiding this comment.
I’d suggest revising the sentence “A tenhou has no winning tile.” There are two separate rule questions here. Does the game distinguish the dealer’s first draw from the initial deal?
And when the dealer wins with tenhou, does a qualifying hand receive the double-yakuman form regardless of which tile was drawn?
In Mahjong Soul, the game log records all 14 tiles as the dealer’s initial hand. The client displays the last tile in the sorted hand as the drawn tile, but the log does not identify a separate first draw.
Tenhou and Riichi City, on the other hand, both record a 13-tile initial hand followed by a distinct first draw.
Example Tenhou replay
Mahjong Soul and Riichi City both explicitly award the double-yakuman form on tenhou regardless of the drawn tile. I’d describe that scoring rule directly in the docstring. It explains the change and covers both ways of recording the deal.
Tenhou’s rules do not specify how it handles this case. Since Tenhou does not award double yakuman, the score would be the same either way, but the yaku name shown in the result could still differ. Do you have a Tenhou replay where the dealer wins with tenhou and the actual first draw would ordinarily give the single-yakuman form? That would let us check which yaku name Tenhou reports.
There was a problem hiding this comment.
Thanks, I have missed these key details. I will close PR for now and will investigate later how tenhou handles it vs other servers
There was a problem hiding this comment.
I support this change, as it improves compatibility with Mahjong Soul and Riichi City. However, I'm concerned about the compatibility of this library with Tenhou, which it's been testing.
A tenhou has no winning tile, but kokushi, chuuren and suuankou were judged by the wait of win_tile, so the same dealt hand scored a different yakuman count depending on which tile was passed.
Every tile kind in a tenhou hand is now tried as the winning tile and the most expensive reading is kept. On equal totals the reading with more double yakuman forms wins, so without has_double_yakuman a tenhou still names that form at single yakuman. Chiihou keeps the wait of its drawn tile.